package com.situ.pm.conroller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.situ.pm.mapper.UserMapper;
import com.situ.pm.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
@CrossOrigin
public class UserController {

    @Autowired
    private UserMapper userMapper;

    @GetMapping("/list")
    public void list(User user){
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.like(user.getName() != null,user.getName());
            queryWrapper.eq(user.getAge() != null,user.getAge());
    }



}
